﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class GUI_Pages_BabysitterRegistration5 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        string connStr = ConfigurationManager.ConnectionStrings["CSConn"].ToString();
        SqlConnection conn = new SqlConnection(connStr);

        SqlCommand cmd1 = new SqlCommand("Registration_Auth", conn);
        cmd1.CommandType = CommandType.StoredProcedure;

        int bsID = Convert.ToInt32(Request.QueryString["bsID"]);
        int actID = Convert.ToInt32(Request.QueryString["bAcctID"]);

        cmd1.Parameters.Add(new SqlParameter("@acctID", actID));
        cmd1.Parameters.Add(new SqlParameter("@user_name", TextBox4.Text));
        cmd1.Parameters.Add(new SqlParameter("@pass_word", TextBox2.Text));

        conn.Open();
        cmd1.ExecuteNonQuery();
        conn.Close();

        Response.Redirect("http://www.cairositters.com/GUI/Pages/BabysitterRegistrationSuccessful.aspx");
        //Response.Redirect("http://localhost:60070/CSWebSite_v1.0/GUI/Pages/BabysitterRegistrationSuccessful.aspx");
    }

    protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
    {
        CheckBox s = (CheckBox)sender;
        if (s.Checked == true)
        {
            SubmitButton.Enabled = true;
        }
        
    }
}